<template>
  <div>
    this is grandson.

    爷爷的车：{{ car.brand }} {{ car.price }}

    <button @click="upateCarPrice">修改爷爷的车</button>
  </div>
</template>

<script setup lang="ts">
  import { inject } from 'vue'

  let { car, upateCarPrice } = inject('car', {
    car: { brand: '', price: 0 },
    upateCarPrice: () => {}
  })
</script>

<style>
</style>